package cn.cknight.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Author: cKnight
 * Date: 2024/4/12
 */
@ConfigurationProperties(prefix = "cknight.sms")
public class SmsProperties {


    /**
     * 默认模版id
     */
    private String defaultTempleId = "90";

    /**
     * 默认秘钥
     */
    private String defaultSecret = "12312312lshdiahdkahs";

    /**
     * 模版id
     */
    private String templeId;

    /**
     * 秘钥
     */
    private String secret;

    public String getTempleId() {
        if (templeId == null || "".equals(templeId)){
            return defaultTempleId;
        }
        return templeId;
    }

    public String getSecret() {
        if (secret == null || "".equals(secret)){
            return defaultSecret;
        }
        return secret;
    }
}
